package com.ayf.payment.game.api.entity;

import com.ayf.payment.game.api.dto.OrderSplitDTO;
import com.ayf.payment.game.api.entity.base.BaseEntity;
import com.ayf.payment.game.api.type.OrderStatus;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Data
@Table(name = "g_order")
public class Order extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * 商户id
     */
    @Column(name = "merchant_id")
    private Integer merchantId;

    /**
     * 代理商户id
     */
    @Column(name = "proxy_id")
    private Integer proxyId;

    /**
     * 游戏id
     */
    @Column(name = "game_info_id")
    private String gameInfoId;

    /**
     * 游戏名称
     */
    @Column(name = "game_info_name")
    private String gameInfoName;

    /**
     * 分组id
     */
    @Column(name = "group_id")
    private String groupId;
    /**
     * 是否分账
     */
    @Column(name = "split_flag")
    private Integer splitFlag;

    /**
     * 分组名称
     */
    @Column(name = "group_name")
    private String groupName;

    /**
     * 分区id
     */
    @Column(name = "partition_id")
    private String partitionId;

    /**
     * 分区名称
     */
    @Column(name = "partition_name")
    private String partitionName;

    /**
     * 商户订单号
     */
    @Column(name = "merchant_order_no")
    private String merchantOrderNo;

    /**
     * 平台订单号
     */
    @Column(name = "order_no")
    private String orderNo;

    /**
     * 充值账号
     */
    @Column(name = "recharge_number")
    private String rechargeNumber;

    /**
     * 订单金额 单位 元
     */
    @Column(name = "amount")
    private BigDecimal amount;

    /**
     * 随机数金额，单位元
     */
    @Column(name = "random_amt")
    private BigDecimal randomAmt;

    /**
     * 手续费，单位元
     */
    @Column(name = "fee")
    private BigDecimal fee;

    /**
     * qq号
     */
    @Column(name = "qq")
    private String qq;

    /**
     * 充值通道name
     */
    @Column(name = "pay_channle_name")
    private String payChannleName;

    /**
     * 充值通道id
     */
    @Column(name = "pay_channle_id")
    private Integer payChannleId;

    /**
     * 充值产品名称
     */
    @Column(name = "pay_type_name")
    private String payTypeName;

    /**
     * 充值产品id
     */
    @Column(name = "pay_type_id")
    private Integer payTypeId;

    /**
     * 充值产品code
     */
    @Column(name = "pay_code")
    private String payCode;


    /**
     * 状态
     */
    @Column(name = "order_status")
    private OrderStatus orderStatus;

    /**
     * 脚本生成状态  1 已生成  0 未生成 -1失败 -2 关闭下发订单
     */
    @Column(name = "script_status")
    private Integer scriptStatus;

    /**
     * 定时任务查询时间 毫秒
     */
    @Column(name = "place_order_time")
    private Long placeOrderTime;

    /**
     * 生成订单日期INT值yyyyMMdd
     */
    @Column(name = "order_generate_time_index")
    private Integer orderGenerateTimeIndex;

    /**
     * 渠道响应码描述
     */
    @Column(name = "channel_rps_msg")
    private String channelRpsMsg;

    /**
     * 系统错误描述
     */
    @Column(name = "rps_msg")
    private String rpsMsg;

    /**
     * 渠道响应码code
     */
    @Column(name = "channel_rps_code")
    private String channelRpsCode;

    /**
     * 商户收入
     */
    @Column(name = "merchant_income")
    private BigDecimal merchantIncome;

    /**
     * 平台收入
     */
    @Column(name = "platform_income")
    private BigDecimal platformIncome;

    /**
     * 代理商收入
     */
    @Column(name = "proxy_income")
    private BigDecimal proxyIncome;

    /**
     * 通道收入
     */
    @Column(name = "channel_income")
    private BigDecimal channelIncome;

    /**
     * 客户端IP地址
     */
    @Column(name = "client_ip")
    private String clientIp;

    /**
     * 客户端IP地址
     */
    @Column(name = "is_settle")
    private Integer isSettle;

    /**
     * 玩家手机号
     */
    @Column(name = "phone")
    private String phone;

    /**
     * 订单完成时间
     */
    @Column(name = "finish_time")
    private Date finishTime;

    @Column(name = "correct_status")
    private Integer correctStatus;

    @Column(name = "operate_ip")
    private String operateIp;

    @Transient
    private int wxNotice;
    @Transient
    private List<OrderSplitDTO> splitDTOList;


}